﻿@model List<asMeishi.web.Models.comment>
@using asMeishi.web.Models;

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
    
</p>
<form action="/comment/index">
    店ID:<input type="text" name="shopId" />
    店名:<input type="text" name="shopName" />
    内容:<input type="text" name="content" />
    <button type="submit">search</button>
</form>
<table>
    <tr>
        <th></th>
        <th>
            id
        </th>
        <th>
            datetime
        </th>
        <th>
            content
        </th>
        <th>
            quality
        </th>
        <th>
            service
        </th>
        <th>
            priceQuality
        </th>
        <th>
            shopId
        </th>
        <th>
            cost
        </th>
        <th>
            userID
        </th>
        <th>
            items
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |

            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
        <td title="@item.Id">
            <input type="checkbox" />
        </td>
        <td>
            @item.datetime
        </td>
        <td>
            @item.content
        </td>
        <td>
            @item.quality
        </td>
        <td>
            @item.service
        </td>
        <td>
            @item.priceQuality
        </td>
        <td title="@item.targetId">
            @item.shopName();
        </td>
        <td>
            @item.cost
        </td>
        <td title="@item.userId">
            @item.getUserName();
        </td>
        <td>
            @item.food
        </td>
    </tr>
}

</table>

